import numpy as np
class Config:
    commands=np.array([0.2,0,0],dtype=np.float32)[None,:]
    kp=60
    kd=5
    onnx_model_path="/home/xjz/catkin_ws/src/my_get_model_state_pkg/scripts/model_pth/xjz_aliengo.onnx"
    hip_scale=0.1
    thigh_scale=0.5
    calf_scale=0.8

    # 以下内容不太容易会改到
    frequency=60
    # isaacgym  policy中joint的顺序
    policy_joint_index={
        'FL_hip_joint':0, 
        'FL_thigh_joint':1,
        'FL_calf_joint':2, 
        'FR_hip_joint':3, 
        'FR_thigh_joint':4, 
        'FR_calf_joint':5, 
        'RL_hip_joint':6, 
        'RL_thigh_joint':7, 
        'RL_calf_joint':8, 
        'RR_hip_joint':9, 
        'RR_thigh_joint':10, 
        'RR_calf_joint':11}
    hip_indices=np.array([1,4,7,10])
    thigh_indices=np.array([2,5,8,11])
    calf_indices=np.array([3,6,9,12])

    # 真机关节点对应电机的顺序
    joint2MotorIndex = {
            "FR_hip_joint":0,
            "FR_thigh_joint":1,
            "FR_calf_joint":2,
            "FL_hip_joint":3,
            "FL_thigh_joint":4,
            "FL_calf_joint":5, 
            "RR_hip_joint":6,
            "RR_thigh_joint":7,
            "RR_calf_joint":8,
            "RL_hip_joint":9,
            "RL_thigh_joint":10,
            "RL_calf_joint":11,
        }
    
    
    defaultJointAngles={  # = target angles when action = 0.0
                'FL_hip_joint': 0,   # [rad]
                'RL_hip_joint': 0 ,  # [rad]
                'FR_hip_joint': 0 , # [rad]
                'RR_hip_joint': 0  , # [rad]
                'FL_thigh_joint': 0.8  ,   # [rad]
                'RL_thigh_joint': 0.8, # [rad]
                'FR_thigh_joint': 0.8,    # [rad]
                'RR_thigh_joint': 0.8 , # [rad]
                'FL_calf_joint': -1.6  ,  # [rad]
                'RL_calf_joint': -1.6   ,  # [rad]
                'FR_calf_joint': -1.6  , # [rad]
                'RR_calf_joint': -1.6  ,  # [rad]
        }